package jsyf.oa.facade.wreport;

import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
import com.alibaba.fastjson.JSONObject;
import jsyf.oa.entity.wreport.WReportCustomerEntity;
import jsyf.oa.entity.wreport.WReportEntity;

import javax.ws.rs.Consumes;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import java.util.Date;
import java.util.List;

/**
 * Created by Administrator on 2017/11/22 0022.
 */
@Path("/wReportService")
@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
public interface WReportFacade {
    @Path("/save")
    String save(String jsonData);

    @Path("/getByUserIdAndReportDate")
    JSONObject getByUserIdAndReportDate(String userId, String reportDate);

    @Path("/getById")
    WReportEntity getById(String id);

    @Path("/getExpenseByParentId")
    List<JSONObject> getExpenseByParentId(String parentId, String userId);

    @Path("/getCustomerType")
    List<JSONObject> getCustomerType();

    @Path("/getCustomerByTel")
    WReportCustomerEntity getCustomerByTel(String jsonData);

    @Path("/getReceiverAndCopiersByUserIdAndReportDate")
    JSONObject getReceiverAndCopiersByUserIdAndReportDate(String userId, String reportDate);

    @Path("/getReceiverAndCopiers")
    JSONObject getReceiverAndCopiers(String userId);

    @Path("/getList")
    List<JSONObject> getList(int year, int month, String userId);

    @Path("/getDayOfMonth")
    int getDayOfMonth();


    @Path("/getDayListOfMonth")
    List<String> getDayListOfMonth();

    @Path("/getDayOfMonth")
    int getDayOfMonth(int year, int month);

    @Path("/getDayListOfMonth")
    List<String> getDayListOfMonth(int year, int month);

    @Path("/formatDateTime")
    String formatDateTime(Date date);

    @Path("/formatDate")
    String formatDate(Date date);

    @Path("/formatMonth")
    String formatMonth(Date date);

    @Path("/getDayCharge")
    List<JSONObject> getDayCharge(String userId, String reportDate);
}
